Reg DXL Script to automate the creation of IN-Links and Out-Links

 

I want to write a DXL script to automate the creation of Out-links and In-lInks

Requirement:

From one module i want to create links to different modules in a project.

For an object in the source module, I'll be giving the information to which modules it needs to link with the Obj ID.

OBJ ID will look e.g.,  LS-405 where LS is the suffix represents the Module name and other is absno.

source Id        TargetID
SRS-111          RS-123
   LS-345
   CTS-678

I want to link the SRS-111 to three different modules.

Can anyone suggest me how to do that?

I did for one - one, but one-many i am unable.


DXLUserbsr - Fri May 31 02:24:55 EDT 2013

Re: Reg DXL Script to automate the creation of IN-Links and Out-Links
llandale - Fri May 31 14:45:48 EDT 2013

You must be able to parse the TargetID value, splitting it up into separate references.  Typical delimiters are comma and CR.

You must be able to un-ambiguously translate a reference "prefix" with a single specific module; e.g.

  • "LS-" refers to "/MyProject/MyFolder/Module-LS"

Your Module Prefixes must have exacty one "-" character and it is at the end.  See what happens if you have "LS-" and also "LS-MJ-" modules.

You must be able to compare the desired links in the attribute with the existing links.  For each reference, you:

  • maintain the existing link
  • create a new link
  • delete the now unwanted link

You will need to be able to deduce the name of the desired link-module.  I do that by specifying multiple "TargetID" attributes, one for each type of valid relationship.  (Satifies, References, Allocates, Tests, ...).

-Louie